home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / shell / axsh_1_3_demo.lha / InstallDisk.lha / Install-AXsh_2.1 < prev    next >
Text File  |  1993-02-11  |  5KB  |  228 lines

  1. ; script to install AXsh (WB 2.1)
  2.  
  3.     ; set up a error cleanup routine
  4.  
  5. (onerror
  6.     (makeassign "AXsh" (safe))
  7. )
  8.  
  9. (set #bad-kick
  10. (cat "You must be using Kickstart 2.04 to install using this script."
  11.     " Double-click the 'AXsh-Install_1.3' icon to install AXsh on"
  12.     " Kickstart 1.2 or 1.3 machines."
  13. ))
  14.  
  15.  
  16. (complete 0)
  17.     ; just in case the installation was restarted
  18.  
  19. (makeassign "AXsh" (safe))    ; start fresh
  20.  
  21.     ; check kick
  22. (if (< (/ (getversion) 65536) 37)
  23. (    (abort #bad-kick)
  24. ))
  25.  
  26.     ; see if this is really an update
  27. (set is_update 0)
  28. (set AXsh_dest (getassign "AXsh" "a"))
  29.  
  30.     ; if update, be sure they want program in same place
  31. (if AXsh_dest
  32.     (if (askbool
  33.             (prompt "Your current copy of AXsh appears to be located in the drawer named \""
  34.                 AXsh_dest
  35.                 "\". Do you want the update installed in that drawer?"
  36.             )
  37.             (help    "The installer has determined that you may already have a "
  38.                 "copy of AXsh installed on your system. If this is wrong or "
  39.                 "you want the update installed elsewhere, select NO as an "
  40.                 "answer. Otherwise, select YES."
  41.             )
  42.             (default 1)
  43.         )
  44.  
  45.         (set is_update 1)        ; if user wants in same place
  46.         (set AXsh_dest            ; if user wants in different place
  47.             (askdir    (prompt "In which disk or drawer should AXsh be installed?")
  48.                 (help @askdir-help)
  49.                 (default @default-dest)
  50.             )
  51.         )
  52.     )
  53.  
  54. ; else if not an update, get a location for program
  55.     (set AXsh_dest
  56.         (askdir    (prompt "In which disk or drawer should AXsh be installed?")
  57.             (help @askdir-help)
  58.             (default @default-dest)
  59.         )
  60.     )
  61. )
  62.  
  63.     ; now lock on to volume 'AXsh'
  64. (askdisk
  65.     (prompt "Please insert \n the master program disk \n labeled \"AXshPack\".")
  66.     (help    "The AXsh program and other options will be copied "
  67.         "from the \"AXsh\" into your system.")
  68.     (dest  "AXshPack")
  69.     (newname "AXsh")
  70. )
  71.  
  72.     ; make AXsh drawer & icon if not there
  73. ;(if (not is_update)    (makedir AXsh_dest (infos)))
  74.  
  75.     ; at this point we have a valid destination, so we tell installer where
  76.     ; the application will end up so the exit page will be correct -- also,
  77.     ; the installation log file (if any) will be copied to the destination
  78. (set @default-dest AXsh_dest)
  79.  
  80. (set whichfiles 
  81.     (askoptions
  82.         (prompt "Please select the files to be copied")
  83.         (help    "This allows you to select only certain parts of the AXsh "
  84.             "system to be installed on your hard drive. For normal installation "
  85.             "select all the items")
  86.         (choices "AXsh system"
  87.              "Manual pages"
  88.              "Language support & WB launchable system services")
  89.     )
  90. )
  91.  
  92.  
  93. (if    (in whichfiles 0)
  94.     (    (makedir (tackon AXsh_dest "bin")    (infos))
  95.         (makedir (tackon AXsh_dest "etc")    (infos))
  96.         (makedir (tackon AXsh_dest "dev")    (infos))
  97.         (makedir (tackon AXsh_dest "home")    (infos))
  98.         (makedir (tackon AXsh_dest "usr")    (infos))
  99.         (makedir (tackon AXsh_dest "storage")    (infos))
  100.  
  101.         (copyfiles
  102.             (source "AXshPack:bin")
  103.             (dest (tackon AXsh_dest "bin"))
  104.             (infos)    (all)
  105.         )
  106.  
  107.         (copyfiles
  108.             (source "AXshPack:dev")
  109.             (dest (tackon AXsh_dest "dev"))
  110.             (infos)    (all)
  111.         )
  112.  
  113.         (copyfiles
  114.             (source "AXshPack:etc")
  115.             (dest (tackon AXsh_dest "etc"))
  116.             (infos)    (all)
  117.         )
  118.  
  119.         (complete 50)
  120.  
  121.         (copyfiles
  122.             (source "AXshPack:home")
  123.             (dest (tackon AXsh_dest "home"))
  124.             (infos)    (all)
  125.         )
  126.  
  127.         (copyfiles
  128.             (source "AXshPack:usr")
  129.             (dest (tackon AXsh_dest "usr"))
  130.             (infos)    (all)
  131.         )
  132.  
  133.         (copyfiles
  134.             (source "AXshPack:info")
  135.             (dest (tackon AXsh_dest "info"))
  136.             (infos)    (all)
  137.         )
  138.  
  139.         (copyfiles
  140.             (source "AXshPack:storage")
  141.             (dest (tackon AXsh_dest "storage"))
  142.             (infos)    (all)
  143.         )
  144.         (copyfiles
  145.             (source "AXshPack:AXsh.info")
  146.             (dest AXsh_dest)
  147.         )
  148.     )
  149. )
  150.  
  151. (complete 80)
  152.  
  153. (if    (in whichfiles 1)
  154.     (
  155.         (copyfiles
  156.             (source "AXshPack:man")
  157.             (dest (tackon AXsh_dest "man"))
  158.             (infos)    (all)
  159.         )
  160.         (copyfiles
  161.             (source "AXshPack:AXshUpdates1.3")
  162.             (dest AXsh_dest)
  163.             (infos)
  164.         )
  165.     )
  166. )
  167.  
  168. (if    (in whichfiles 2)
  169.     (
  170.         (copyfiles
  171.             (source "AXshPack:storage/AX-Sysghost.info")
  172.             (dest "SYS:WBStartup")
  173.         )
  174.         (copyfiles
  175.             (source "AXshPack:storage/AX-Server.info")
  176.             (dest "SYS:WBStartup")
  177.         )
  178.         (copyfiles
  179.             (source "AXshPack:Storage/DosDrivers")
  180.             (dest "DEVS:DosDrivers")
  181.             (all) (infos)
  182.         )
  183.         (copyfiles
  184.             (source "AXshPack:Storage/Locale/Catalogs")
  185.             (dest "LOCALE:Catalogs")
  186.             (all) (infos)
  187.         )
  188.         (copyfiles
  189.             (source "AXshPack:Storage/Presets/AXsh.locale")
  190.             (dest "SYS:Prefs/Presets")
  191.             (infos)
  192.         )
  193.         (copyfiles
  194.             (source "AXshPack:bin/AXAUX-Handler")
  195.             (dest "L:")
  196.         )
  197.     )
  198. )
  199.  
  200.  
  201. (complete 95)
  202.  
  203.     ; modify S:User-Startup
  204.  
  205. (startup "AXsh"
  206.     (prompt
  207.         "I need to add \"assign AXsh: " AXsh_dest "\" to the \"S:user-startup\" "
  208.         "so that your system will be properly configured to use AXsh.")
  209.     (help "Do this or AXsh won't work!!")
  210.     (command "ASSIGN AXsh: \"" AXsh_dest "\"\n"
  211.     )
  212. )
  213.  
  214.  
  215.     ; reinitialize assigns
  216.  
  217. (if (not @pretend)
  218.     (makeassign "AXsh" AXsh_dest)
  219. )
  220.  
  221. (complete 100)
  222.  
  223.     ; cleanup
  224. (makeassign "AXshPack" (safe))
  225.  
  226.     ; this is not strictly necessary, but doesn't hurt
  227. (exit)
  228.